package com.test.oom;

import java.util.Random;

public class JavaHeapSpaceDemo {
    public static void main(String[] args) {
       Byte[] bytes = new Byte[30 * 1024 * 1024];//将堆内存设置小点，new一个大对象，直接报堆溢出
    }
}
